package edu.sctu.zhoumengxue.day201506.day20150612;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * Created by user12 on 2015/6/12.
 */
public class Iteratoration {
    public void isIterator(){

        List list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");
        list.add("e");
        list.add("f");

        Iterator iterator = list.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }

}
